<?php
require 'include/global.php';
require_once 'include/train_db.php';
$smarty->compile_check = true;
$smarty->display('header.tpl');

//print_r($_SESSION);
include("./check/checkpost.php");

if(empty($_POST)){
	$_POST[locountry] = 211;
	$_POST[ifshow_email] = 0;
	$_POST[ifshow_phone] = 0;
	$_POST[ifshow_fax] = 0;
	$_POST[ifshow_jobtitle] = 1;
	$_POST[ifshow_skype] = 0;
	$_POST[ifshow_spokenlanguage] = 1;
	$_POST[ifshow_recruitex] = 1;
	$_POST[ifshow_companyurl] = 0;
	$_POST[ifshow_address] = 0;
	$_POST[share] = 1;
}


$get = $_GET[act];
 if($_POST[newsmailist]==''){$_POST[newsmailist] = "1";}		
 
switch($get){
   case rec:
	   ob_clean();
	   ob_start();
		   echo '<script type="text/javascript" src="include/jquery.tokeninput.js"></script>';
	   	   $cpforms->formheader(array('title'=>'','name'=>'article','enctype'=>'multipart/form-data'));
		   $cpforms->makehidden(array('name'=>'action','value'=>'rec_doinsert'));
		   $cpforms->makehidden(array('name'=>'sam', 'value'=>''));
	 	   $cpforms->longline(array('title'=>"Account Information",'right'=>"Check to Show"));

		   $cpforms->gethightext(array('text'=>"Username",'name'=>"user_name",'only'=>1,'value'=>"$_POST[user_name]",'read'=>"$read",'view'=>"$view",'icon'=>"'Username is 6-12 Characters and is Case Sensitive.', WIDTH, 200, SHADOW, true"));
	       $cpforms->gethightext(array('text'=>"Password",'name'=>"password",'type'=>"password",'only'=>1,'view'=>"$view",'icon'=>"'Password is 6-12 Characters and is Case Sensitive.', WIDTH, 200, SHADOW, true"));
		   $cpforms->gethightext(array('text'=>"Re-type Password",'name'=>"password2",'type'=>"password",'only'=>1,'view'=>"$view"));
		   
		   $cpforms->longline(array('title'=>"User Information"));
		   $cpforms->gethightext(array('text'=>"First Name",'name'=>"firstname",'only'=>1,'value'=>"$_POST[firstname]",'view'=>"$view"));
		   $cpforms->gethightext(array('text'=>"Last Name", 'name'=>"lastname",'only'=>1,'value'=>"$_POST[lastname]",'view'=>"$view"));
           $cpforms->gethightext(array('text'=>"Email Address", 'name'=>"email",'only'=>1,'value'=>"$_POST[email]",'view'=>"$view","ifshow"=>array("name"=>"ifshow_email","value"=>"$_POST[ifshow_email]")));
		   $cpforms->gethightext(array('text'=>"How did you hear about us?",'name'=>"howus",'value'=>"$_POST[howus]",'view'=>"$view"));
		   $cpforms->gethightext(array('text'=>"Service Code",'name'=>"servicecode",'value'=>"$_POST[servicecode]",'view'=>"$view",'icon'=>"'If you have a service code please enter it here.', WIDTH, 200, SHADOW, true"));
		   $cpforms->longline(array('title'=>"Profile Details"));
		   $cpforms->gethightext(array('text'=>"Your Profile Title or Name", 'name'=>"companyname",'only'=>1,'value'=>"$_POST[companyname]",'view'=>"$view"));
		   $cpforms->gethightext(array('text'=>"Website URL",'name'=>"companyurl",'value'=>"$_POST[companyurl]",'view'=>"$view",'icon'=>"'Just type in <font color=blue>http://www.yourdomainname.com</font> here.', WIDTH, 200, SHADOW, true",'prevalue'=>"http://", "ifshow"=>array("name"=>"ifshow_companyurl","value"=>"$_POST[ifshow_companyurl]")));
		   $cpforms->makefile(array('text'=>"Picture (up to size 50KB.)",'name'=>"uploadfile", 'value'=>"$_POST[rc_uploadfile]",'view'=>"$view"));
		   $cpforms->gethightext(array('text'=>"Your Skype ID", 'name'=>"skype",'value'=>"$_POST[skype]",'view'=>"$view",'icon'=>"' If you do not have a Skype ID, you may complete this field later.  To get FREE Skype, <a href=\'http://www.skype.com/download\'>Go Here</a>', WIDTH, 200, TITLE,'', SHADOW, true, FADEIN, 100, FADEOUT, 100, STICKY, 1,  CLOSEBTN, true, CLICKCLOSE, true","ifshow"=>array("name"=>"ifshow_skype","value"=>"$_POST[ifshow_skype]")));
		   $cpforms->gethightext(array('text'=>"Address",'name'=>"address",'only'=>1,'value'=>"$_POST[address]",'view'=>"$view", "ifshow"=>array("name"=>"ifshow_address","value"=>"$_POST[ifshow_address]")));
		   $cpforms->gethightext(array('text'=>"City",'name'=>"locity",'only'=>1,'value'=>"$_POST[locity]",'view'=>"$view"));
		   $cpforms->makeselect(array('one'=>1,'text'=>"State", 'name'=>"lostate",'only'=>1,'option'=>$state,'selected'=>"$_POST[lostate]",'view'=>"$view",'viewfunction'=>'state'));
		   $cpforms->gethightext(array('text'=>"Zip Code",'name'=>"zip",'only'=>1,'value'=>"$_POST[zip]",'view'=>"$view"));
		   $cpforms->makeselect(array('one'=>1,'text'=>"Country",'name'=>"locountry",'only'=>1,'option'=>$country,'selected'=>"$_POST[locountry]",'view'=>"$view",'viewfunction'=>'country'));
		   $cpforms->gethightext(array('text'=>"Phone", 'name'=>"phone",'value'=>"$_POST[phone]",'view'=>"$view","ifshow"=>array("name"=>"ifshow_phone","value"=>"$_POST[ifshow_phone]")));
		   $cpforms->gethightext(array('text'=>"Fax", 'name'=>"fax",'value'=>"$_POST[fax]",'view'=>"$view","ifshow"=>array("name"=>"ifshow_fax","value"=>"$_POST[ifshow_fax]")));
		   $cpforms->gethightext(array('text'=>"Job Title", 'name'=>"jobtitle",'only'=>1,'value'=>"$_POST[jobtitle]",'view'=>"$view","ifshow"=>array("name"=>"ifshow_jobtitle","value"=>"$_POST[ifshow_jobtitle]")));
		   $cpforms->makeselect(array('one'=>1,'text'=>"Industry", 'name'=>"industry",'only'=>1,'option'=>$jobcategory,'selected'=>"$_POST[industry]",'view'=>"$view",'viewfunction'=>'jobcategory'));
		   $cpforms->gethightext(array('text'=>"Your spoken language(s)",'name'=>"spokenlanguage",'value'=>"$_POST[spokenlanguage]",'view'=>"$view","ifshow"=>array("name"=>"ifshow_spokenlanguage","value"=>"$_POST[ifshow_spokenlanguage]")));
		   $cpforms->gethightext(array('text'=>"Years of work experience",'name'=>"recruitex",'only'=>1,'value'=>"$_POST[recruitex]",'view'=>"$view", "ifshow"=>array("name"=>"ifshow_recruitex","value"=>"$_POST[ifshow_recruitex]")));
		
		   $cpforms->makeselect(array('one'=>1,'text'=>"General Service Area",'name'=>"generalarea",'only'=>1,'option'=>$service,'selected'=>"$_POST[generalarea]",'view'=>"$view",'viewfunction'=>'service'));
		   $cpforms->makeselect(array('one'=>1,'text'=>"Primary Service State",'name'=>"pristate",'only'=>1,'option'=>$state,'selected'=>"$_POST[pristate]",'view'=>"$view",'viewfunction'=>'state'));
		   $cpforms->makeselect(array('one'=>1,'text'=>"Primary Service Country",'name'=>"pricountry",'only'=>1,'option'=>$country,'selected'=>"$_POST[pricountry]",'view'=>"$view",'viewfunction'=>'country'));
		   $cpforms->gethightext(array('text'=>"If service area is outside of the U.S., please indicate location",'name'=>"indicate",'value'=>"$_POST[indicate]",'view'=>"$view")); 
										
			$cpforms->longline(array('title'=>"Experience and Specialty"));	
			//init
			foreach($jobfunction as $key=>$val){
				if($key == 0) continue;
				$specialtyOptionsArr[] =  '{"name":"=>'.$val.'", "id":"'.$key.'"} ';
			}
			$specialtyOptions = @implode(",",$specialtyOptionsArr);
			if($_POST['topspecialty']){
				$post1Arr = @explode(",",$_POST['topspecialty']);
				foreach($post1Arr as $s){
					$post1s[] = '{"name":"=>'.$jobfunction[$s].'","id":"'.$s.'"}';
				}
				$post1 = @implode(",",$post1s);
				$post1 = str_replace("++","+",$post1);
				$post1 = ",prePopulate:[".$post1."]";
			}
			if($_POST['morespecialty']){
				$post2Arr = @explode(",",$_POST['morespecialty']);
				foreach($post2Arr as $s){
					$post2s[] = '{"name":"=>'.$jobfunction[$s].'","id":"'.$s.'"}';
				}
				$post2 = @implode(",",$post2s);
				$post2 = str_replace("++","+",$post2);
				$post2 = ",prePopulate:[".$post2."]";
			}
			
			echo    '<style>
						.myjobs ul.token-input-list {width: 320px;}
					</style>
					<tr class="firstalt" nowrap><td width="40%" > Your top recruiting specialty (select one): </td>
					   <td width="60%" >
						 <div style="float:left;" class="myjobs">
							<input  type="text" name="topspecialty" maxlength="200" value="" id="topspecialty"  style="width:130px;" ><font color="gray">Please type "=" to show all Job Functions.</font>
						</div>
						</td>
				   </tr>';

			echo '
			  <script>
				$(document).ready(function() {
							$("#topspecialty").tokenInput(['.$specialtyOptions.'],{
								preventDuplicates: true,
								hintText: "Type in a job function",
								tokenLimit: 1
								'.$post1.'
							});
						});
			  </script>
			  ';
			echo    '
					<tr class="firstalt" nowrap><td width="40%" > Add more recruiting specialties: </td>
					   <td width="60%" >
						 <div style="float:left;" class="myjobs">
							<input  type="text" name="morespecialty" maxlength="200" value="" id="morespecialty"  style="width:130px;" ><font color="gray">Please type "=" to show all Job Functions.</font>
						</div>
						</td>
				   </tr>';

			echo '
			  <script>
				$(document).ready(function() {
							$("#morespecialty").tokenInput(['.$specialtyOptions.'],{
								preventDuplicates: true,
								hintText: "Type in a job function"
								'.$post2.'
							});
						});
			  </script>
			  ';
			
			//init
			foreach($hrExperience as $key=>$val){
				if($key == 0) continue;
				$hrExOptionsArr[] =  '{"name":"=>'.$val.'", "id":"'.$key.'"} ';
			}
			$hrExOptions = @implode(",",$hrExOptionsArr);  
			if($_POST['hrexperience']){
				$post3Arr = @explode(",",$_POST['hrexperience']);
				foreach($post3Arr as $s){
					$post3s[] = '{"name":"=>'.$hrExperience[$s].'","id":"'.$s.'"}';
				}
				$post3 = @implode(",",$post3s);
				$post3 = str_replace("++","+",$post3);
				$post3 = ",prePopulate:[".$post3."]";
			}
			echo    '
					<tr class="firstalt" nowrap><td width="40%" > Your HR experience: </td>
					   <td width="60%" >
						 <div style="float:left;" class="myjobs">
							<input  type="text" name="hrexperience" maxlength="200" value="" id="hrexperience"  style="width:130px;" ><font color="gray">Please type "=" to show all Experiences.</font>
						</div>
						</td>
				   </tr>';

			echo '
			  <script>
				$(document).ready(function() {
							$("#hrexperience").tokenInput(['.$hrExOptions.'],{
								preventDuplicates: true,
								hintText: "Type in a job function"
								'.$post3.'
							});
						});
			  </script>
			  ';

			//init
			foreach($jobcategory as $key=>$val){
				if($key == 0) continue;
				$industryOptionsArr[] =  '{"name":"=>'.$val.'", "id":"'.$key.'"} ';
			}
			$industryOptions = @implode(",",$industryOptionsArr);
			
			if($_POST['moreindustry']){
				$post4Arr = @explode(",",$_POST['moreindustry']);
				foreach($post4Arr as $s){
					$post4s[] = '{"name":"=>'.$jobcategory[$s].'","id":"'.$s.'"}';
				}
				$post4 = @implode(",",$post4s);
				$post4 = str_replace("++","+",$post4);
				$post4 = ",prePopulate:[".$post4."]";
			}

			echo    '
					<tr class="firstalt" nowrap><td width="40%" > Add more industry experience: </td>
					   <td width="60%" >
						 <div style="float:left;" class="myjobs">
							<input  type="text" name="moreindustry" maxlength="200" value="" id="moreindustry"  style="width:130px;" ><font color="gray">Please type "=" to show all Industries.</font>
						</div>
						</td>
				   </tr>';

			echo '
			  <script>
				$(document).ready(function() {
							$("#moreindustry").tokenInput(['.$industryOptions.'],{
								preventDuplicates: true
								'.$post4.'
							});
						});
			  </script>
			  ';
		   $cpforms->maketextarea(array('text'=>"Include a brief self introduction.",'name'=>"description",'value'=>"$_POST[description]",'view'=>"$view" ,'icon'=>"'Please describe in 500 characters or less.  You may edit this later.', WIDTH, 200, SHADOW, true"));
		   $cpforms->longline(array('title'=>"Contact Perference"));  
		   $cpforms->gethighradio(array('text'=>"Are you open to job-split or partnerships?",'name'=>"share",'only'=>1,'selected'=>"$_POST[share]",'view'=>"$view",'icon'=>"'Select \'Yes\' if you wish to receive invitations to connect from others. Connecting with others on enetRecruiter allows you to easily send them messages and collaborate on job requisitions. You may edit this setting anytime.', WIDTH, 300, SHADOW, true"));
		   $cpforms->gethighradio(array('text'=>"Are you open to regular employee or direct hire opportunities?",'name'=>"business",'only'=>1,'selected'=>"$_POST[business]",'view'=>"$view"));
		   $cpforms->gethighradio(array('text'=>"Are you open to contract opportunities?",'name'=>"contract",'only'=>1,'selected'=>"$_POST[contract]",'view'=>"$view"));
		   $cpforms->gethighradio(array('text'=>"Are you open to consulting opportunities?",'name'=>"consulting",'only'=>1,'selected'=>"$_POST[consulting]",'view'=>"$view"));
		 
		   //$cpforms->longline(array('title'=>"Show My Jobs"));		   
		   //$cpforms->gethightext(array('text'=>" Currently Recruiting",'name'=>"myclient1",'value'=>"",'view'=>"$view"));

		   $cpforms->longline(array('title'=>"Privacy Status"));
		   $cpforms->gethighradio(array ('text' => "My Profile Status",'name' => "pristatus",'options'=>$pri_pub,'only' => 0,'selected' => "$_POST[pristatus]",'view' => "$view",'icon'=>"'Select <U>Public</U> to include your profile in our members directory. Select <U>Private</U> if you do not wish to be included in our members directory. You may change this setting anytime.', WIDTH, 200, SHADOW, true"));

		   $cpforms->longline(array('title'=>"User Agreement"));
		   $cpforms->getbox(array('text'=>"I have read, agree to and accept enetRecruiter's <a href=\"termsofuse.php\" target=\"_blank\">Terms of Use</a> agreement",'name'=>"agree1",'value'=>"$_POST[agree1]",'only'=>1));
		  // $cpforms->getbox(array('text'=>"I agree to provide my professional qualifications, business entity information (if applicable), prior employment information, if requested by enetRecruiter, as a condition of using this site and when obtaining premium membership status.",'name'=>"agree2",'value'=>"$_POST[agree2]",'only'=>1,'icon'=>"'You must agree and check this box in order to access our site.', WIDTH, 300, SHADOW, true"));
		   $cpforms->makePhpCaptcha(array('text'=>"Secruity Code",'name'=>"imagecode",'value'=>"$_POST[imagecode]",'only'=>1));
		   
		   
		  //$cpforms->gethighradio(array('text'=>"Would you like to subscribe to our newsletter",'name'=>"newsmailist",'selected'=>"$_POST[newsmailist]",'view'=>"$view"));
		   		   
		  //$cpforms->longline(array('title'=>"Profile Information"));		   
		  // $cpforms->gethightext(array('text'=>"Company Size (Please put 'Self' if you work independently)", 'name'=>"companysize",'only'=>1,'value'=>"$_POST[companysize]",'view'=>"$view",'icon'=>"'Enter an estimated number of full time employees.', WIDTH, 200, SHADOW, true"));
		   
		   

		   
		   
		   
		   
		   $cpforms->formfooter(array('confirm'=>6));
		   $reg_data = ob_get_contents();
       ob_end_clean();
	   $title   = "Recruiter Registration";
	   $content = "Complete this form to get started. (<font color=red>*</font>=Required Field)";
	   $smarty->assign('title',$title);
	   $smarty->assign('content',$content);

	   if($err!=''){
	   $smarty->assign("err",$err);
	   }
	   $smarty->assign("verify",$verify);
       $smarty->assign("reg",$reg_data);
	   $smarty->display('left.tpl');
	   if(empty($verify)){
			$smarty->display('reg.tpl');
	   }else{
			$smarty->assign("content",$verify);
			$smarty->display('verify.tpl');
	   }
   break;


   case rec2:
	   ob_clean();
	   ob_start();
	   echo "<pre>";
	   //print_r($_SESSION);
	   echo "</pre>";
	     echo '<tr><td  bgcolor="#ffffff" colspan="2">
				   Welcome to this important step towards partnering with enetRecruiter.  This is a step recruiters must go through if you wish to submit candidates to employers on our site. This is a quality measure we take to ensure that we deliver a high level of professionalism and service to our employers.  Once your information is submitted to us we will review it thoroughly.  The approval process usually takes 2-3 business days.  Once your account is approved your membership status will be upgrade to the Full Access level where you can submit candidates to employers.  While your account is under review, you will be given access to our site at the Standard Access level.  The Standard Access level allows you to participate in all of the services available to our Full Access members, except submitting candidates to employers.  If for whatever reason your account is not approved, your access level will remain unchanged at the Standard Access level.  You will receive an email from us notifying you of your status change.  Our membership fee is the same for Standard Access and Full Access.  Finally, in order to ensure an enjoyable experience for all members, we reserve the rights and discretion to remove any user (or block any user from our site) who violates our Terms of Use agreement.  Thank you for your understanding and cooperation! 
		          </td></tr>';
	   	   $cpforms->formheader(array('title'=>'Qualification','name'=>'article','enctype'=>'multipart/form-data'));
		   $cpforms->makehidden(array('name'=>'action','value'=>'rec_doinsert2'));
		   $cpforms->makehidden(array('name'=>'buy','value'=>'1'));

         
		   $cpforms->gethightext(array('text'=>"Business License Number", 'name'=>"licensenumber",'only'=>1,'value'=>"$_POST[licensenumber]",'view'=>"$view",'icon'=>"'  Please note you must provide a copy of your valid business license (or tax certificate) to us when requested by an enetRecruiter representative.  A failure to do so will delay your approval process and/or subject your account to suspension until we receive a valid copy. ', WIDTH, 200, TITLE,'', SHADOW, true, FADEIN, 100, FADEOUT, 100"));
		   $cpforms->gethightext(array('text'=>"Business License Issuing City, State, Country", 'name'=>"licenseissue",'only'=>1,'value'=>"$_POST[licenseissue]",'view'=>"$view",'icon'=>"' Please indicate the city, state and country in which your business license was issued.', WIDTH, 200, TITLE,'', SHADOW, true, FADEIN, 100, FADEOUT, 100"));
		   $cpforms->gethightext(array('text'=>"Licensing Office Phone Number", 'name'=>"licensephone",'only'=>1,'value'=>"$_POST[licensephone]",'view'=>"$view",'icon'=>"' Please enter your Federal Tax ID#.', WIDTH, 200, TITLE,'', SHADOW, true, FADEIN, 100, FADEOUT, 100"));
		   $cpforms->longline(array('title'=>"Professional Reference "));		   
		   $cpforms->smallline(array('title'=>"1st Reference"));	
		   $cpforms->gethightext(array('text'=>"Company Name ",'name'=>"companyname1",'value'=>"$_POST[companyname1]",'view'=>"$view",'only'=>1));
		   $cpforms->gethightext(array('text'=>"Contact Name ",'name'=>"contactname1",'value'=>"$_POST[contactname1]",'view'=>"$view",'only'=>1));
		   $cpforms->gethightext(array('text'=>"Phone Number ",'name'=>"phonenumber1",'value'=>"$_POST[phonenumber1]",'view'=>"$view",'only'=>1));
		   $cpforms->gethightext(array('text'=>"Email ",'name'=>"email1",'value'=>"$_POST[email1]",'view'=>"$view",'only'=>1));
		   $cpforms->gethightext(array('text'=>"Relationship",'name'=>"relationship1",'value'=>"$_POST[relationship1]",'view'=>"$view",'only'=>1));
		   $cpforms->smallline(array('title'=>"2nd Reference"));
		   $cpforms->gethightext(array('text'=>"Company Name ",'name'=>"companyname2",'value'=>"$_POST[companyname2]",'view'=>"$view",'only'=>1));
		   $cpforms->gethightext(array('text'=>"Contact Name ",'name'=>"contactname2",'value'=>"$_POST[contactname2]",'view'=>"$view",'only'=>1));
		   $cpforms->gethightext(array('text'=>"Phone Number ",'name'=>"phonenumber2",'value'=>"$_POST[phonenumber2]",'view'=>"$view",'only'=>1));
		   $cpforms->gethightext(array('text'=>"Email ",'name'=>"email2",'value'=>"$_POST[email2]",'view'=>"$view",'only'=>1));
		   $cpforms->gethightext(array('text'=>"Relationship",'name'=>"relationship2",'value'=>"$_POST[relationship2]",'view'=>"$view",'only'=>1));
		   $cpforms->smallline(array('title'=>"3rd Reference"));
		   $cpforms->gethightext(array('text'=>"Company Name ",'name'=>"companyname3",'value'=>"$_POST[companyname3]",'view'=>"$view",'only'=>1));
		   $cpforms->gethightext(array('text'=>"Contact Name ",'name'=>"contactname3",'value'=>"$_POST[contactname3]",'view'=>"$view",'only'=>1));
		   $cpforms->gethightext(array('text'=>"Phone Number ",'name'=>"phonenumber3",'value'=>"$_POST[phonenumber3]",'view'=>"$view",'only'=>1));
		   $cpforms->gethightext(array('text'=>"Email ",'name'=>"email3",'value'=>"$_POST[email3]",'view'=>"$view",'only'=>1));
		   $cpforms->gethightext(array('text'=>"Relationship",'name'=>"relationship3",'value'=>"$_POST[relationship3]",'view'=>"$view",'only'=>1));

		   
		   
		   
		   
		   $cpforms->formfooter(array('confirm'=>4));
		   $reg_data = ob_get_contents();
       ob_end_clean();
	   if($err!=''){
	   $smarty->assign("err",$err);
	   }
       $smarty->assign("reg",$reg_data);
	   $smarty->display('left.tpl');

	   $smarty->display('reg.tpl');
   break;

   case can:
	   ob_clean();
	   ob_start();
	   	   $cpforms->formheader(array('title'=>'Login Information',
		 								'name'=>'article'));
		   $cpforms->makehidden(array('name'=>'action',
									   'value'=>'can_doinsert'));
		   $cpforms->makehidden(array('name'=>'sam', 'value'=>''));

	       $cpforms->gethightext(array('text'=>"√Username",'name'=>"user_name",'only'=>1,'value'=>"$_POST[user_name]",'read'=>"$read",'view'=>"$view",'icon'=>"'Username is 6-12 Characters and is Case Sensitive.', WIDTH, 200, SHADOW, true"));
	       $cpforms->gethightext(array('text'=>"Password",'name'=>"password",'type'=>"password",'only'=>1,'view'=>"$view",'icon'=>"'Password is 6-12 Characters and is Case Sensitive.', WIDTH, 200, SHADOW, true"));
		   $cpforms->gethightext(array('text'=>"Re-type Password",'name'=>"password2",'type'=>"password",'only'=>1,'view'=>"$view"));
		   $cpforms->longline(array('title'=>"User Information"));
		   $cpforms->gethightext(array('text'=>"Your First Name",'name'=>"firstname",'only'=>1,'value'=>"$_POST[firstname]",'view'=>"$view"));
		   $cpforms->gethightext(array('text'=>"Your Last Name", 'name'=>"lastname",'only'=>1,'value'=>"$_POST[lastname]",'view'=>"$view"));
           $cpforms->gethightext(array('text'=>"Your Email Address", 'name'=>"email",'only'=>1,'value'=>"$_POST[email]",'view'=>"$view"));
		   $cpforms->gethightext(array('text'=>"Your Phone", 'name'=>"phone",'only'=>1,'value'=>"$_POST[phone]",'view'=>"$view"));
		   $cpforms->gethightext(array('text'=>"√Your Job Title", 'name'=>"jobtitle",'only'=>1,'value'=>"$_POST[jobtitle]",'view'=>"$view"));
		   $cpforms->makeselect(array('one'=>1,'text'=>"√Industry Category", 'name'=>"industry",'only'=>1,'option'=>$jobcategory,'selected'=>"$_POST[industry]",'view'=>"$view",'viewfunction'=>'jobcategory'));
		   $cpforms->gethightext(array('text'=>"√Your Skype ID", 'name'=>"skype",'value'=>"$_POST[skype]",'view'=>"$view",'icon'=>"' If you do not have a Skype ID, you may complete this field later.  To get FREE Skype, <a href=\'http://www.skype.com/download\'>Go Here</a>', WIDTH, 200, TITLE,'', SHADOW, true, FADEIN, 100, FADEOUT, 100, STICKY, 1,  CLOSEBTN, true, CLICKCLOSE, true"));
		   $cpforms->gethightext(array('text'=>"Address",'name'=>"address",'only'=>1,'value'=>"$_POST[address]",'view'=>"$view"));
		   $cpforms->gethightext(array('text'=>"√Location - City",'name'=>"locity",'only'=>1,'value'=>"$_POST[locity]",'view'=>"$view"));
		   $cpforms->makeselect(array('one'=>1,'text'=>"√Location - State", 'name'=>"lostate",'only'=>1,'option'=>$state,'selected'=>"$_POST[lostate]",'view'=>"$view",'viewfunction'=>'state'));
		   $cpforms->gethightext(array('text'=>"√Location - Zip Code",'name'=>"lozip",'only'=>1,'value'=>"$_POST[lozip]",'view'=>"$view"));

		   $cpforms->makeselect(array('one'=>1,'text'=>"√Location - Country",'name'=>"locountry",'only'=>1,'option'=>$country,'selected'=>"$_POST[locountry]",'view'=>"$view",'viewfunction'=>'country'));
           $cpforms->gethighradio(array('text'=>"Would you like to subscribe to our newsletter",'name'=>"newsmailist",'only'=>1,'selected'=>"$_POST[newsmailist]",'view'=>"$view"));
		   $cpforms->gethightext(array('text'=>"How did you hear about us?",'name'=>"howus",'only'=>1,'value'=>"$_POST[howus]",'view'=>"$view"));
		   $cpforms->gethightext(array('text'=>"Service Code",'name'=>"servicecode",'value'=>"$_POST[servicecode]",'view'=>"$view",'icon'=>"'If you have a service code please enter it here.', WIDTH, 200, SHADOW, true"));
		   $cpforms->longline(array('title'=>"User Agreement"));
		   $cpforms->getbox(array('text'=>"I have read, agree to and accept enetRecruiter's <a href=\"termsofuse.php\" target=\"_blank\">Terms of Use</a> agreement",'name'=>"agree1",'value'=>"$_POST[agree1]",'only'=>1,'icon'=>"' You must read, agree to and accept the enetRecruiter <a href=\'termsofuse.php\' target=\'_blank\'>Terms of Use</a> agreement in order to access our site.', WIDTH, 200, TITLE,'', SHADOW, true, FADEIN, 100, FADEOUT, 100, STICKY, 1,  CLOSEBTN, true, CLICKCLOSE, true"));
		   $cpforms->getbox(array('text'=>"I agree to provide true and accurate resume information on this site and when communicating with other users on this site.  My resume information may include, but is not limited to, my education, training, and work history",'name'=>"agree2",'value'=>"$_POST[agree2]",'only'=>1,'icon'=>"'You must agree and check this box in order to access our site.', WIDTH, 300, SHADOW, true"));
		   $cpforms->makePhpCaptcha(array('text'=>"Safe Code",'name'=>"imagecode",'value'=>"$_POST[imagecode]",'only'=>1));
	       $cpforms->formfooter(array('confirm'=>5));
		   $reg_data = ob_get_contents();
       ob_end_clean();
       $title   = "Candidate Registration";
	   $content = "Membership is free so register now!  Once you've successfully registered, you may post your resume, apply to job opportunities, network with other professionals and connect with high-tech recruiters. <br /><br />
Be sure to fill in all the required fields below with an asterisk. All the fields below with a check mark (√) in front may be included in our new member list for view by other users. Fields without a check mark are private. Your account information is for enetRecruiter internal records only.(<font color=red>*</font>=Required Field)  ";
	   $smarty->assign('title',$title);
	   $smarty->assign('content',$content);

	   if($err!=''){
	   $smarty->assign("err",$err);
	   }
       $smarty->assign("reg",$reg_data);
		$smarty->display('left.tpl');

	   $smarty->display('reg.tpl');
   break;


  case emp:
	  echo '<meta http-equiv="refresh" content="0;url=index.php">';
	  exit;
	   ob_clean();
	   ob_start();
	   	  $cpforms->formheader(array('title'=>'Login Information',
										'name'=>'article'));
			$cpforms->makehidden(array('name'=>'action',
									   'value'=>'emp_doinsert'));
			$cpforms->makehidden(array('name'=>'sam', 'value'=>''));
	        $cpforms->gethightext(array('text'=>"√Username",'name'=>"user_name",'only'=>1,'value'=>"$_POST[user_name]",'read'=>"$read",'view'=>"$view",'icon'=>"'Username is 6-12 Characters and is Case Sensitive.', WIDTH, 200, SHADOW, true"));
	       $cpforms->gethightext(array('text'=>"Password",'name'=>"password",'type'=>"password",'only'=>1,'view'=>"$view",'icon'=>"'Password is 6-12 Characters and is Case Sensitive.', WIDTH, 200, SHADOW, true"));
		   $cpforms->gethightext(array('text'=>"Re-type Password",'name'=>"password2",'type'=>"password",'only'=>1,'view'=>"$view"));
		   $cpforms->longline(array('title'=>"Contact Information"));
		   $cpforms->gethightext(array('text'=>"Your First Name",'name'=>"firstname",'only'=>1,'value'=>"$_POST[firstname]",'view'=>"$view"));
		   $cpforms->gethightext(array('text'=>"Your Last Name", 'name'=>"lastname",'only'=>1,'value'=>"$_POST[lastname]",'view'=>"$view"));
           $cpforms->gethightext(array('text'=>"Your Email Address", 'name'=>"email",'only'=>1,'value'=>"$_POST[email]",'view'=>"$view"));
		   $cpforms->gethightext(array('text'=>"Your Phone", 'name'=>"phone",'only'=>1,'value'=>"$_POST[phone]",'view'=>"$view"));
		   $cpforms->gethightext(array('text'=>"Your Fax", 'name'=>"fax",'value'=>"$_POST[fax]",'view'=>"$view"));
		   $cpforms->gethightext(array('text'=>"Your Job Title", 'name'=>"jobtitle",'only'=>1,'value'=>"$_POST[jobtitle]",'view'=>"$view"));
		   $cpforms->gethightext(array('text'=>"Your Skype ID", 'name'=>"skype",'value'=>"$_POST[skype]",'view'=>"$view",'icon'=>"' If you do not have a Skype ID, you may complete this field later.  To get FREE Skype, <a href=\'http://www.skype.com/download\'>Go Here</a>', WIDTH, 200, TITLE,'', SHADOW, true, FADEIN, 100, FADEOUT, 100, STICKY, 1,  CLOSEBTN, true, CLICKCLOSE, true"));
		   $cpforms->gethighradio(array('text'=>"Would you like to subscribe to our newsletter",'name'=>"newsmailist",'only'=>1,'selected'=>"$_POST[newsmailist]",'view'=>"$view"));
		   $cpforms->gethightext(array('text'=>"How did you hear about us?",'name'=>"howus",'only'=>1,'value'=>"$_POST[howus]",'view'=>"$view"));
		   $cpforms->gethightext(array('text'=>"Service Code", 'name'=>"servicecode",'value'=>"$_POST[servicecode]",'view'=>"$view",'icon'=>"'If you have a service code please enter it here.', WIDTH, 200, SHADOW, true"));
		   
		   
		   $cpforms->longline(array('title'=>"Company Information"));
		   $cpforms->gethightext(array('text'=>"Company Name", 'name'=>"companyname",'only'=>1,'value'=>"$_POST[companyname]",'view'=>"$view"));
		   $cpforms->gethightext(array('text'=>"Company Website URL",'name'=>"companyurl",'only'=>1,'value'=>"$_POST[companyurl]",'view'=>"$view"));
		   $cpforms->makeselect(array('one'=>1,'text'=>"√Industry", 'name'=>"industry",'only'=>1,'option'=>$jobcategory,'selected'=>"$_POST[industry]",'view'=>"$view",'viewfunction'=>'jobcategory'));
		   $cpforms->gethightext(array('text'=>"√Company Size", 'name'=>"companysize",'only'=>1,'value'=>"$_POST[companysize]",'view'=>"$view",'icon'=>"' Enter an estimated number of full time employees.', WIDTH, 300, SHADOW, true"));
		   $cpforms->gethightext(array('text'=>"Address",'name'=>"address",'only'=>1,'value'=>"$_POST[address]",'view'=>"$view"));
		   $cpforms->gethightext(array('text'=>"√Location - City",'name'=>"locity",'only'=>1,'value'=>"$_POST[locity]",'view'=>"$view"));
		   $cpforms->makeselect(array('one'=>1,'text'=>"√Location - State", 'name'=>"lostate",'only'=>1,'option'=>$state,'selected'=>"$_POST[lostate]",'view'=>"$view",'viewfunction'=>'state'));
		   $cpforms->gethightext(array('text'=>"√Location - Zip Code",'name'=>"lozip",'only'=>1,'value'=>"$_POST[lozip]",'view'=>"$view"));
		   $cpforms->makeselect(array('one'=>1,'text'=>"√Location - Country",'name'=>"locountry",'only'=>1,'option'=>$country,'selected'=>"$_POST[locountry]",'view'=>"$view",'viewfunction'=>'country'));
		   $cpforms->gethightext(array('text'=>"ER Account Manager",'name'=>"eraccount",'value'=>"$_POST[eraccount]",'view'=>"$view",'icon'=>"'Enter the name of your enetRecruiter account manager.', WIDTH, 300, SHADOW, true"));
		   $cpforms->maketextarea(array('text'=>"Company Culture",'name'=>"culture",'value'=>"$_POST[culture]",'view'=>"$view",'icon'=>"'Please describe in 500 characters or less.  You may edit this later.', WIDTH, 300, SHADOW, true"));
		   $cpforms->maketextarea(array('text'=>"Company Benefits",'name'=>"benefits",'value'=>"$_POST[benefits]",'view'=>"$view",'icon'=>"'Please describe in 500 characters or less.  You may edit this later.', WIDTH, 300, SHADOW, true"));
		   $cpforms->longline(array('title'=>"Billing Information (Complete only if different from the information above)"));
		   
           $cpforms->gethightext(array('text'=>"Contact Name for Billing",'name'=>"bname",'value'=>"$_POST[bname]",'view'=>"$view"));
           $cpforms->gethightext(array('text'=>"Contact Email for Billing",'name'=>"bemail",'value'=>"$_POST[bemail]",'view'=>"$view"));
		   $cpforms->gethightext(array('text'=>"Contact Phone for Billing",'name'=>"bphone",'value'=>"$_POST[bphone]",'view'=>"$view"));
		   $cpforms->gethightext(array('text'=>"Billing Address",'name'=>"baddress",'value'=>"$_POST[baddress]",'view'=>"$view"));

		   $cpforms->longline(array('title'=>"Business Entity Information",'icon'=>"'This Business Entity and Professional Reference section must be completed within 30 days of registration.  Employers must have a valid U.S. Federal Tax Identification number (or EIN) and a Business License number in order to hire candidates referred through our site.  Please contact us if you have any questions. ', WIDTH, 300, SHADOW, true"));
		   $cpforms->gethightext(array('text'=>"Business License Number",'name'=>"licensenumber",'value'=>"$_POST[licensenumber]",'view'=>"$view",'icon'=>"'Please Business License Number. ', WIDTH, 300, SHADOW, true"));
		   $cpforms->gethightext(array('text'=>"Business License Issuing City, State, Country",'name'=>"licenseissue",'value'=>"$_POST[licenseissue]",'view'=>"$view",'icon'=>"'Please enter the city, state and country in which your business license was issued.', WIDTH, 300, SHADOW, true"));
		   $cpforms->gethightext(array('text'=>"Federal Tax ID#",'name'=>"licensephone",'value'=>"$_POST[licensephone]",'view'=>"$view",'icon'=>"'Please enter your Federal Tax ID#.', WIDTH, 300, SHADOW, true"));
		   $cpforms->longline(array('title'=>"Professional Reference"));
		   $cpforms->smallline(array('title'=>"1st Reference"));
           $cpforms->gethightext(array('text'=>"Company Name",'name'=>"ref_1_cpname",'value'=>"$_POST[ref_1_cpname]",'view'=>"$view"));
           $cpforms->gethightext(array('text'=>"Contact Name",'name'=>"ref_1_ctname",'value'=>"$_POST[ref_1_ctname]",'view'=>"$view"));
           $cpforms->gethightext(array('text'=>"Phone",'name'=>"ref_1_phone",'value'=>"$_POST[ref_1_phone]",'view'=>"$view"));
           $cpforms->gethightext(array('text'=>"Email",'name'=>"ref_1_email",'value'=>"$_POST[ref_1_email]",'view'=>"$view"));
           $cpforms->gethightext(array('text'=>"Relationship",'name'=>"ref_1_relationship",'value'=>"$_POST[ref_1_relationship]",'view'=>"$view"));
		   $cpforms->smallline(array('title'=>"2nd Reference"));
           $cpforms->gethightext(array('text'=>"Company Name",'name'=>"ref_2_cpname",'value'=>"$_POST[ref_2_cpname]",'view'=>"$view"));
           $cpforms->gethightext(array('text'=>"Contact Name",'name'=>"ref_2_ctname",'value'=>"$_POST[ref_2_ctname]",'view'=>"$view"));
           $cpforms->gethightext(array('text'=>"Phone",'name'=>"ref_2_phone",'value'=>"$_POST[ref_2_phone]",'view'=>"$view"));
           $cpforms->gethightext(array('text'=>"Email",'name'=>"ref_2_email",'value'=>"$_POST[ref_2_email]",'view'=>"$view"));
           $cpforms->gethightext(array('text'=>"Relationship",'name'=>"ref_2_relationship",'value'=>"$_POST[ref_2_relationship]",'view'=>"$view"));
		   $cpforms->smallline(array('title'=>"3rd Reference"));
           $cpforms->gethightext(array('text'=>"Company Name",'name'=>"ref_3_cpname",'value'=>"$_POST[ref_3_cpname]",'view'=>"$view"));
           $cpforms->gethightext(array('text'=>"Contact Name",'name'=>"ref_3_ctname",'value'=>"$_POST[ref_3_ctname]",'view'=>"$view"));
           $cpforms->gethightext(array('text'=>"Phone",'name'=>"ref_3_phone",'value'=>"$_POST[ref_3_phone]",'view'=>"$view"));
           $cpforms->gethightext(array('text'=>"Email",'name'=>"ref_3_email",'value'=>"$_POST[ref_3_email]",'view'=>"$view"));
           $cpforms->gethightext(array('text'=>"Relationship",'name'=>"ref_3_relationship",'value'=>"$_POST[ref_3_relationship]",'view'=>"$view"));
		   $cpforms->longline(array('title'=>"User Agreement"));
		   $cpforms->getbox(array('text'=>"I have read, agree to and accept enetRecruiter's <a href=\"termsofuse.php\" target=\"_blank\">Terms of Use</a> agreement",'name'=>"agree1",'value'=>"$_POST[agree1]",'only'=>1,'icon'=>"' You must read, agree to and accept the enetRecruiter <a href=\'termsofuse.php\' target=\'_blank\'>Terms of Use</a> agreement in order to access our site.', WIDTH, 200, TITLE,'', SHADOW, true, FADEIN, 100, FADEOUT, 100, STICKY, 1,  CLOSEBTN, true, CLICKCLOSE, true"));
		   $cpforms->getbox(array('text'=>"I agree to provide enetRecruiter my company business entity and professional reference information within 30 days of registration",'name'=>"agree2",'value'=>"$_POST[agree2]",'only'=>1,'icon'=>"'You must agree and check this box in order to access our site.', WIDTH, 300, SHADOW, true"));
		   $cpforms->makePhpCaptcha(array('text'=>"Safe Code",'name'=>"imagecode",'value'=>"$_POST[imagecode]",'only'=>1));
	       $cpforms->formfooter(array('confirm'=>5));
		   $reg_data = ob_get_contents();
       ob_end_clean();
       
	   $title   = "Employer Registration";
	   $content = "Welcome!  In just minutes, you will be able to post job assignments and immediately tap into a community of experienced and well-connected recruiters. Membership is FREE for one year!  So take advantage of our offer and get started now. <br /><br />
Please be sure to complete all the fields below with an asterisk before you click on the 'Join Now!' button.  The fields with a check mark (√) in front may be included in our new member list for view by the public.  All fields without a check mark are private and, therefore, are not viewable to the public.  Your private account information is for enetRecruiter internal records only.(<font color=red>*</font>=Required Field)";
	   $smarty->assign('title',$title);
	   $smarty->assign('content',$content);
	   if($err!=''){
	   $smarty->assign("err",$err);
	   }
       $smarty->assign("reg",$reg_data);
		$smarty->display('left.tpl');

	   $smarty->display('reg.tpl');
   break;

   case adv:
	   ob_clean();
	   ob_start();
	   	   $cpforms->formheader(array('title'=>'Login Information',
		 								'name'=>'article','enctype'=>'multipart/form-data'));
		   $cpforms->makehidden(array('name'=>'action',
									   'value'=>'adv_doinsert'));
		   $cpforms->makehidden(array('name'=>'sam', 'value'=>''));
	       $cpforms->gethightext(array('text'=>"√Username",'name'=>"user_name",'only'=>1,'value'=>"$_POST[user_name]",'read'=>"$read",'view'=>"$view",'icon'=>"'Username is 6-12 Characters and is Case Sensitive.', WIDTH, 200, SHADOW, true"));
	       $cpforms->gethightext(array('text'=>"Password",'name'=>"password",'type'=>"password",'only'=>1,'view'=>"$view",'icon'=>"'Password is 6-12 Characters and is Case Sensitive.', WIDTH, 200, SHADOW, true"));
		   $cpforms->gethightext(array('text'=>"Re-type Password",'name'=>"password2",'type'=>"password",'only'=>1,'view'=>"$view"));

		   $cpforms->longline(array('title'=>"Contact Information"));
		   $cpforms->gethightext(array('text'=>"√Your First Name",'name'=>"firstname",'only'=>1,'value'=>"$_POST[firstname]",'view'=>"$view"));
		   $cpforms->gethightext(array('text'=>"√Your Last Name", 'name'=>"lastname",'only'=>1,'value'=>"$_POST[lastname]",'view'=>"$view"));
           $cpforms->gethightext(array('text'=>"√Your Email Address", 'name'=>"email",'only'=>1,'value'=>"$_POST[email]",'view'=>"$view"));
		   $cpforms->gethightext(array('text'=>"√Your Phone", 'name'=>"phone",'only'=>1,'value'=>"$_POST[phone]",'view'=>"$view"));
		   $cpforms->gethightext(array('text'=>"√Your Fax", 'name'=>"fax",'value'=>"$_POST[fax]",'view'=>"$view"));		  
		   $cpforms->gethightext(array('text'=>"√Your Job Title", 'name'=>"jobtitle",'only'=>1,'value'=>"$_POST[jobtitle]",'view'=>"$view"));
		  // $cpforms->makeselect(array('text'=>"√Industry Category", 'name'=>"industry",'only'=>1,'option'=>$jobcategory,'selected'=>"$_POST[industry]",'view'=>"$view",'viewfunction'=>'jobcategory'));
		   $cpforms->gethightext(array('text'=>"√Your Skype ID", 'name'=>"skype",'value'=>"$_POST[skype]",'view'=>"$view",'icon'=>"' If you do not have a Skype ID, you may complete this field later.  To get FREE Skype, <a href=\'http://www.skype.com/download\'>Go Here</a>', WIDTH, 200, TITLE,'', SHADOW, true, FADEIN, 100, FADEOUT, 100, STICKY, 1,  CLOSEBTN, true, CLICKCLOSE, true"));
		   $cpforms->gethightext(array('text'=>"√Your Spoken Language(s)",'name'=>"spokenlanguage",'only'=>1,'value'=>"$_POST[spokenlanguage]",'view'=>"$view"));
		   $cpforms->gethightext(array('text'=>"√Years of Work Experience",'name'=>"yrexp",'only'=>1,'value'=>"$_POST[yrexp]",'view'=>"$view"));
           $cpforms->maketextarea(array('text'=>"√Please write a brief description about you or your company here ",'only'=>1,'name'=>"description",'value'=>"$_POST[description]",'view'=>"$view" ,'icon'=>"'Please describe in 500 characters or less.  You may edit this later.', WIDTH, 200, SHADOW, true"));
           $cpforms->gethighradio(array('text'=>"Would you like to subscribe to our newsletter",'name'=>"newsmailist",'only'=>1,'selected'=>"$_POST[newsmailist]",'view'=>"$view"));		   
		   $cpforms->gethightext(array('text'=>"How did you hear about us?",'name'=>"howus",'only'=>1,'value'=>"$_POST[howus]",'view'=>"$view"));
		   $cpforms->gethightext(array('text'=>"Service Code",'name'=>"servicecode",'value'=>"$_POST[servicecode]",'view'=>"$view",'icon'=>"'If you have a service code please enter it here.', WIDTH, 200, SHADOW, true"));
		   $cpforms->makefile(array('text'=>"√Picture (Only accept image size less than 50KB.)",'name'=>"uploadfile", 'value'=>"$_POST[ad_uploadfile]",'view'=>"$view"));
		 
		   $cpforms->longline(array('title'=>"Company Information"));
		   $cpforms->gethightext(array('text'=>"√Company Name", 'name'=>"companyname",'only'=>1,'value'=>"$_POST[companyname]",'view'=>"$view"));
		   $cpforms->gethightext(array('text'=>"√Company Website URL",'name'=>"companyurl",'value'=>"$_POST[companyurl]",'view'=>"$view"));
		   $cpforms->makeselect(array('one'=>1,'text'=>"√Industry", 'name'=>"industry",'only'=>1,'option'=>$jobcategory,'selected'=>"$_POST[industry]",'view'=>"$view",'viewfunction'=>'jobcategory'));
		   $cpforms->gethightext(array('text'=>"Company Size (No. of Employees)", 'name'=>"companysize",'only'=>1,'value'=>"$_POST[companysize]",'view'=>"$view",'icon'=>"' Enter an estimated number of full time employees.', WIDTH, 300, SHADOW, true"));
		   $cpforms->gethightext(array('text'=>"Business Address",'name'=>"address",'only'=>1,'value'=>"$_POST[address]",'view'=>"$view"));
		   $cpforms->gethightext(array('text'=>"√Location - City",'name'=>"locity",'only'=>1,'value'=>"$_POST[locity]",'view'=>"$view"));
		   $cpforms->makeselect(array('one'=>1,'text'=>"√Location - State", 'name'=>"lostate",'only'=>1,'option'=>$state,'selected'=>"$_POST[lostate]",'view'=>"$view",'viewfunction'=>'state'));
		   $cpforms->gethightext(array('text'=>"√Location - Zip Code",'name'=>"lozip",'only'=>1,'value'=>"$_POST[lozip]",'view'=>"$view"));
		   $cpforms->makeselect(array('one'=>1,'text'=>"√Location - Country",'name'=>"locountry",'only'=>1,'option'=>$country,'selected'=>"$_POST[locountry]",'view'=>"$view",'viewfunction'=>'country'));
           $cpforms->makeselect(array('one'=>1,'text'=>"√Your General Service Area",'name'=>"generalarea",'only'=>1,'option'=>$service,'selected'=>"$_POST[generalarea]",'view'=>"$view",'viewfunction'=>'service'));
		   $cpforms->makeselect(array('one'=>1,'text'=>"√Your Primary Service Area (State)",'name'=>"pristate",'only'=>1,'option'=>$state,'selected'=>"$_POST[pristate]",'view'=>"$view",'viewfunction'=>'state'));
		   $cpforms->makeselect(array('one'=>1,'text'=>"√Your Primary Service Area (Country)",'name'=>"pricountry",'only'=>1,'option'=>$country,'selected'=>"$_POST[pricountry]",'view'=>"$view",'viewfunction'=>'country'));
		   $cpforms->gethightext(array('text'=>"√Your Specialty",'name'=>"specialty",'only'=>1,'value'=>"$_POST[specialty]",'view'=>"$view"));
		  
		   $cpforms->gethightext(array('text'=>"√If service area is outside of the U.S., please indicate location",'name'=>"indicate",'value'=>"$_POST[indicate]",'view'=>"$view"));
		   $cpforms->longline(array('title'=>"My Links",'icon'=>"'Below are links you can add to appear on your public profile page. You may edit this later. ', WIDTH, 300, SHADOW, true"));		   
		   $cpforms->gethightext(array('text'=>"√My Top 3 Clients(1)",'name'=>"myclient1",'value'=>"$_POST[myclient1]",'view'=>"$view"));
		   $cpforms->gethightext(array('text'=>"√My Top 3 Clients(2)",'name'=>"myclient2",'value'=>"$_POST[myclient2]",'view'=>"$view"));
		   $cpforms->gethightext(array('text'=>"√My Top 3 Clients(3)",'name'=>"myclient3",'value'=>"$_POST[myclient3]",'view'=>"$view"));
		   $cpforms->gethightext(array('text'=>"√My Online Links(1)",'name'=>"myonline1",'value'=>"$_POST[myonline1]",'view'=>"$view",'prevalue'=>"http://"));
		   $cpforms->gethightext(array('text'=>"√My Online Links(2)",'name'=>"myonline2",'value'=>"$_POST[myonline2]",'view'=>"$view",'prevalue'=>"http://"));
		   $cpforms->gethightext(array('text'=>"√My Online Links(3)",'name'=>"myonline3",'value'=>"$_POST[myonline3]",'view'=>"$view",'prevalue'=>"http://"));
		   $cpforms->gethightext(array('text'=>"√My Favoriate Sites (1)",'name'=>"myfavoritet1",'value'=>"$_POST[myfavoritet1]",'view'=>"$view",'prevalue'=>"http://"));
		   $cpforms->gethightext(array('text'=>"√My Favoriate Sites (2)",'name'=>"myfavoritet2",'value'=>"$_POST[myfavoritet2]",'view'=>"$view",'prevalue'=>"http://"));
		   $cpforms->gethightext(array('text'=>"√My Favoriate Sites (3)",'name'=>"myfavoritet3",'value'=>"$_POST[myfavoritet3]",'view'=>"$view",'prevalue'=>"http://")); 
		   $cpforms->gethightext(array('text'=>"√My Professional Affiliation (1)",'name'=>"myprofession1",'value'=>"$_POST[myprofession1]",'view'=>"$view"));
		   $cpforms->gethightext(array('text'=>"√My Professional Affiliation (2)",'name'=>"myprofession2",'value'=>"$_POST[myprofession2]",'view'=>"$view"));
		   $cpforms->gethightext(array('text'=>"√My Professional Affiliation (3)",'name'=>"myprofession3",'value'=>"$_POST[myprofession3]",'view'=>"$view"));
		   
		   $cpforms->longline(array('title'=>"User Agreement"));
		   $cpforms->getbox(array('text'=>"I have read, agree to and accept enetRecruiter's <a href=\"termsofuse.php\" target=\"_blank\">Terms of Use</a> agreement",'name'=>"agree1",'value'=>"$_POST[agree1]",'only'=>1,'icon'=>"' You must read, agree to and accept the enetRecruiter <a href=\'termsofuse.php\' target=\'_blank\'>Terms of Use</a> agreement in order to access our site.', WIDTH, 200, TITLE,'', SHADOW, true, FADEIN, 100, FADEOUT, 100, STICKY, 1,  CLOSEBTN, true, CLICKCLOSE, true"));
		   $cpforms->getbox(array('text'=>"I agree to provide my professional qualifications, business entity information (if applicable), prior employment information, if requested by enetRecruiter, as a condition of using this site and when obtaining premium membership status",'name'=>"agree2",'value'=>"$_POST[agree2]",'only'=>1,'icon'=>"' You must agree and check this box in order to access our site.', WIDTH, 300, SHADOW, true"));
		   $cpforms->makePhpCaptcha(array('text'=>"Safe Code",'name'=>"imagecode",'value'=>"$_POST[imagecode]",'only'=>1));


	       $cpforms->formfooter(array('confirm'=>2));
		   $reg_data = ob_get_contents();
       ob_end_clean();
       $title   = "Advisor Registration";
	   $content = "Welcome! In just minutes, you will be able to share your expertise and promote your services to other members on our site.<br /><br />
Please note the fields below with a check mark (√) in front will be included in your public profile page and may also be included in our new member list. All fields without a check mark are not included, therefore are private. If a required field does not apply to you or you do not wish to share the information simply type-in 'NA' to indicate not applicable. 
(<font color=red>*</font>=Required Field) ";
	   $smarty->assign('title',$title);
	   $smarty->assign('content',$content);

	   if($err!=''){
	   $smarty->assign("err",$err);
	   }
       $smarty->assign("reg",$reg_data);
	   $smarty->display('left.tpl');

	   $smarty->display('reg.tpl');
   break;



   default:
       $smarty->assign("err","Please select a member type from the list before you click on the 'Join Now' button");
		 $smarty->display('left.tpl');

       $smarty->display('error.tpl');
}



$smarty->display('right.tpl');
$smarty->display('footer.tpl');
?>
